package com.alipay.sofa.award.endpoint.facade;

import com.alipay.sofa.award.endpoint.constants.RestConstants;
import com.alipay.sofa.award.endpoint.constants.URLConstants;
import com.alipay.sofa.award.endpoint.response.RestSampleFacadeResp;

import javax.ws.rs.*;
import java.util.Map;

/**
 * ActivityAwardRestFacade
 *
 * @author yangguanchao
 * @since 2018/08/28
 */
@Path(URLConstants.REST_API_PEFFIX + "/activity/award")
@Consumes(RestConstants.DEFAULT_CONTENT_TYPE)
@Produces(RestConstants.DEFAULT_CONTENT_TYPE)
public interface ActivityAwardRestFacade {

    /**
     * http://localhost:8341/webapi/activity/award
     *
     * @param activityTime activityTime
     * @return award result success or false
     * @throws Exception exception
     */
    @GET
    @Path("/")
    RestSampleFacadeResp<Map<String, Object>> getAward(@HeaderParam("userId") String userId,
                                                       @QueryParam("activityTime") String activityTime)
                                                                                                       throws Exception;

    /**
     * http://localhost:8341/webapi/activity/award/qualification
     * @param userId userId
     * @param activityTime activityTime
     * @return true is have award qualification
     * @throws Exception exception
     */
    @GET
    @Path("/qualification")
    RestSampleFacadeResp getAwardQualification(@HeaderParam("userId") String userId,
                                               @QueryParam("activityTime") String activityTime)
                                                                                               throws Exception;

}
